<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: qupen
  Date: 2016/9/19
  Time: 14:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<header class="main-header" id="main-header">
    <!-- Logo -->
    <a class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <scan class="logo-mini" style="font-size: 44px;color: #41aaaa;">s</scan>
        <!-- logo for regular state and mobile devices -->
        <div class="logo-lg-wrapper">
            <div class="logo-lg-container">
                <img class="logo-lg" src="/images/logo.png">
            </div>
        </div>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" role="navigation">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button" style="border: none">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>

        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <!-- User Account: style can be found in dropdown.less -->
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="border: none">
                        <c:choose>
                            <c:when test="${sessionScope['siemens.multitenant.login.user'].getLogoMd5()==null||sessionScope['siemens.multitenant.login.user'].getLogoMd5()==''}">
                                <img src="/images/avatar.png" class="user-image" alt="User Image">
                            </c:when>
                            <c:otherwise>
                                <img src="/api/v1/image/get?name=${sessionScope['siemens.multitenant.login.user'].getLogoMd5()}" class="user-image" alt="User Image">
                            </c:otherwise>
                        </c:choose>
                        <span class="hidden-xs">${sessionScope['siemens.multitenant.login.user'].getUserName()}</span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header">
                            <c:choose>
                                <c:when test="${sessionScope['siemens.multitenant.login.user'].getLogoMd5()==null||sessionScope['siemens.multitenant.login.user'].getLogoMd5()==''}">
                                    <img src="/images/avatar.png" class="user-image" alt="User Image">
                                </c:when>
                                <c:otherwise>
                                    <img src="/api/v1/image/get?name=${sessionScope['siemens.multitenant.login.user'].getLogoMd5()}" class="img-circle" alt="User Image">
                                </c:otherwise>
                            </c:choose>
                            <p>
                                ${sessionScope['siemens.multitenant.login.user'].getUserName()} - ${sessionScope['siemens.multitenant.login.user'].getTelephone()}
                                <small>${sessionScope['siemens.multitenant.login.user'].getCreateTime()}</small>
                            </p>
                        </li>
                        <li class="user-body">
                            <div class="row">
                                <div class="col-xs-6 text-center">
                                    <a style="border: none">${sessionScope['siemens.multitenant.login.user'].getDepartment()}</a>
                                </div>
                            </div>
                        </li>
                    </ul>
                </li>

                <li>
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="border: none">
                        <img src="/images/language.png"/>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li>
                            <a href="javascript:;" onclick="chooseLanguage('en')">English</a>
                            <a href="javascript:;" onclick="chooseLanguage('zh')">Chinese</a>
                        </li>
                    </ul>
                </li>
                <!-- logout -->
                <li>
                    <a href="/admin/logout" style="border: none"> <img class="logo-lg" src="/images/quit_black.png"></a>
                </li>
            </ul>
        </div>
    </nav>
</header>
